// import Home from "../views/Home.vue";
// import Hello from "../views/Hello.vue";
import { createRouter,createWebHashHistory } from "vue-router";
// import User from "../views/user/User.vue";
// import UserProfile from "../views/user/UserProfile.vue";
// import UserPosts from "../views/user/UserPosts.vue";
import Order from "../views/Order.vue";
import User from "../views/User.vue";


const routes = [
    // {path : "/", component: Home},
    // {path : "/hello", component: Hello},
    // {path : "/haha/:id", component: ()=>import('../views/Haha.vue')},
    // {
    //     path: "/user/:id",
    //     component:User,
    //     name: 'User',
    //     children:[{
    //         path: 'profile',
    //         name: 'Profile',
    //         component: UserProfile
    //     },{
    //         path: 'posts',
    //         name: 'Posts',
    //         component: UserPosts
    //     }]
    // }
    {path : "/user", name:'User', component: User},
    {path : "/order", name:'Order', component: Order},
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

// router.beforeEach((to,from)=>{
//     console.log("to",to);
//     console.log("from",from); 
//     return true
// })

export default router;


